package com.xiaoyu.lingdian.controller;

import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.xiaoyu.lingdian.tool.photo.CreatePicUtil;

@Controller
@RequestMapping(value="/create")
public class CreatePicController extends BaseController {
	
	/**
	* 生成图片
	* @return
	*/
	@RequestMapping(value="/pic", method=RequestMethod.GET)
	public void createPic (String content, HttpServletResponse response) {
		logger.info("[CreatePicController]:begin createSignPic");
		byte[] bytes = new CreatePicUtil().markImageByIcon(content);
		writePicStream(response, bytes);
		logger.info("[CreatePicController]:end createSignPic");
	}

}